package site.wetsion.galio.sdk.utils;

import java.util.regex.Pattern;

/**
 * @author weixin
 * @version 1.0
 * @CLassName UrlMatchUtil
 * @date 2019/3/18 6:48 PM
 */
public class UrlMatchUtil {

    public static boolean checkMatch(String platformUrl, String requestUrl) {
        if (requestUrl.equals(platformUrl)) {
            return true;
        }
        String newUrl = platformUrl.replaceAll("\\*", ".*");
        return Pattern.matches(newUrl, requestUrl);
    }
}
